package fr.afcepf.atod18.hotels.managedbeans;

import java.util.ArrayList;
import java.util.List;

public class UI_BasketSelection {
	String headername;
	String dateModification;
	String selectionID;
	private double total;
	List<UI_BasketReservation> reservations = new ArrayList<UI_BasketReservation>();

	public String getHeadername() {
		headername = "Panier " + selectionID + " du " + dateModification;
		return headername;
	}

	public void setHeadername(String headername) {
		this.headername = headername;
	}

	public String getDateModification() {
		return dateModification;
	}

	public void setDateModification(String dateModification) {
		this.dateModification = dateModification;
	}

	public String getSelectionID() {
		return selectionID;
	}

	public void setSelectionID(String selectionID) {
		this.selectionID = selectionID;
	}

	public List<UI_BasketReservation> getReservations() {
		return reservations;
	}

	public void setReservations(List<UI_BasketReservation> reservations) {
		this.reservations = reservations;
	}

	public double getTotal() {
		total = 0;
		for ( UI_BasketReservation br:reservations) {
			total = total + br.getTotal();
		}
		return total;
	}

	public void setTotal(double total) {
		this.total = total;
	}
}
